package com.net.xpay.admin.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.net.xpay.common.domain.UserProfile;
import com.net.xpay.common.domain.partner.PartnerCode;
import com.net.xpay.common.enums.user.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 2020/5/21 14:28

 */
@Getter
@Setter
@NoArgsConstructor
public class UserVo  {

    @ApiModelProperty(notes = "用户编号")
    private Long id;
    /**
     * 以下是基本登陆属性
     */
    @ApiModelProperty(notes = "手机号", example = "18812345678")
    private String mobile;

    @ApiModelProperty(notes = "记账本ID")
    private String bookIds;

    @ApiModelProperty(notes = "用户唯一标识码")
    private String uid;

    @ApiModelProperty(notes = "收集收款信息用的二维码")
    private String collectQrcode;

    @ApiModelProperty(notes = "软件版本")
    private AppVersion appVersion;

    @ApiModelProperty(notes = "外部系统用户编码 对接外部系统")
    private String outerId;

    @ApiModelProperty(notes = "渠道用户id， 是哪个渠道下的用户")
    private Long channelMasterUserId;

    @ApiModelProperty(notes = "密码", example = "123456")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String payPassword; //支付密码,BCrypt加密的

    @ApiModelProperty(notes = "服务费单价 分")
    private Long serviceUnitPrice;

    @ApiModelProperty(notes = "到卡服务费单价 分")
    private Long bankServiceUnitPrice;

    @ApiModelProperty(notes = "平台实际服务费 分")
    private Long serviceRealPrice;

    @ApiModelProperty(notes = "淘客检测单价 分")
    private Long taokeUnitPrice;

    @ApiModelProperty(notes = "当前使用的主支付宝账号")
    private String alipayNickName;

    @ApiModelProperty(notes = "当前使用的主支付宝账号id")
    private Long alipayUserId;

    /**
     * 实名信息
     */
    @ApiModelProperty(notes = "姓名")
    private String name;

    @ApiModelProperty(notes = "备注")
    private String remark;

    @ApiModelProperty(notes = "体量描述")
    private String volumeDesc;

    @ApiModelProperty(notes = "合伙人写的备注")
    private String partnerRemark;

    /**
     * 系统补充字段
     */
    @ApiModelProperty(notes = "首次充值时间", example = "2018-12-17 11:52:26")
    private LocalDateTime chargeTime;

    @ApiModelProperty(notes = "最近充值时间", example = "2018-12-17 11:52:26")
    private LocalDateTime lastChargeTime;

    @ApiModelProperty(notes = "注册时间", example = "2018-12-17 11:52:26")
    private LocalDateTime registerTime;

    @ApiModelProperty(notes = "注册时候的ip", example = "192.0.0.3")
    private String registerIp;

    @ApiModelProperty(notes = "上次登录时间", example = "2018-12-17 11:53:18")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty(notes = "上次的登录来源")
    private ClientFrom lastLoginClient;

    @ApiModelProperty(notes = "最后一次登陆ip", example = "192.0.0.3")
    private String lastLoginIp;

    @ApiModelProperty(notes = "累计登陆次数")
    private Long loginCount;

    /**
     * 安全相关字段
     */
    @ApiModelProperty(notes = "安全状态", example = "0")
    private SecurityStatus securityStatus;

    @ApiModelProperty(notes = "安全备注")
    private String securityRemark;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(notes = "密码输入错误的次数", example = "1")
    private Integer errorCount;


    /**
     * 推广来源信息
     */
    @ApiModelProperty(notes = "合伙人id")
    private Long partnerId;

    @ApiModelProperty(notes = "收费模式")
    private ServicePayMode mode;

    @ApiModelProperty(notes = "分佣模式")
    private CommissionMode commissionMode;

    /**
     * 比例收费模式
     */
    @ApiModelProperty(notes = "服务费收费比例")
    private BigDecimal serviceRatio;

    @ApiModelProperty(notes = "到卡服务费收费比例")
    private BigDecimal bankServiceRatio;

    @ApiModelProperty(notes = "合伙人毛利润分佣比例")
    private BigDecimal benefitRatio;

    @ApiModelProperty(notes = "父合伙人毛利润分佣比例")
    private BigDecimal fatherBenefitRatio;

    //按成本算模式
    @ApiModelProperty(notes = "服务费成本价收费比例")
    private BigDecimal costServiceRatio;

    @ApiModelProperty(notes = "到卡服务费成本价收费比例")
    private BigDecimal bankCostServiceRatio;

    @ApiModelProperty(notes = "上级模式")
    private CommissionMode fatherCommissionMode;

    //二级合伙人 成本模式下 上级模式是指定上级费率模式下使用
    @ApiModelProperty(notes = "上级合伙人到户分佣费率")
    private BigDecimal fatherServiceRatio;

    //二级合伙人 成本模式下 上级模式是指定上级费率模式下使用
    @ApiModelProperty(notes = "上级合伙人到卡分佣费率")
    private BigDecimal fatherBankServiceRatio;



    /**
     * 笔数收费模式
     */
    @ApiModelProperty(notes = "合伙人佣金 分")
    private Long partnerBenefit;

    @ApiModelProperty(notes = "父级合伙人id")
    private Long fatherPartnerId;

    @ApiModelProperty(notes = "父级合伙人佣金 分")
    private Long fatherPartnerBenefit;

    @ApiModelProperty(notes = "用户标签")
    private UserTag userTag;

    @ApiModelProperty(notes = "行业类别")
    private IndustryCategory industryCategory;

    @ApiModelProperty(notes = "合伙人邀请码")
    private String pma;

    //以下为vo字段
    @ApiModelProperty(notes = "多商户管理账号")
    private String operatorUserAccount;

    @ApiModelProperty(notes = "剩余的money")
    private Long moneyLeft;

    @ApiModelProperty(notes = "免费转账批次数量 单位次")
    private Long transBatchLeft;

    @ApiModelProperty(notes = "用户标签描述")
    private String userTagName;

    @ApiModelProperty(notes = "行业类别描述")
    private String industryCategoryName;

    @ApiModelProperty(notes = "软件版本名")
    private String appVersionName;
    
    @ApiModelProperty(notes = "用户配置信息")
    private UserProfile userProfile;

    @ApiModelProperty(notes = "合伙人推广码信息")
    private PartnerCode partnerCode;

    @ApiModelProperty(notes = "是否有appkey")
    private Boolean hasAppkey;

    @ApiModelProperty(notes = "有密签约数")
    private Long payTransSignCount;

    @ApiModelProperty(notes = "安全付签约数")
    private Long safePaySignCount;

    @ApiModelProperty(notes = "到支付宝服务费分佣费率")
    private BigDecimal partnerServiceRatio;

    @ApiModelProperty(notes = "到卡服务费分佣费率")
    private BigDecimal partnerBankServiceRatio;
}
